FROM node:14.15.4-alpine3.10
COPY ./ /app
WORKDIR /app
RUN npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/
RUN npm install --registry=https://registry.npm.taobao.org && npm run build

FROM nginx
RUN mkdir /app

RUN rm /etc/nginx/conf.d/default.conf
ADD default.conf /etc/nginx/conf.d/
COPY --from=0 /app/dist /usr/share/nginx/html